package ru.ksu.ktk.diploma.sdi.mapping.thesauri;

public class DescriptorPair {
    private String firstId;
    private String secondId;
    

    public DescriptorPair(String firstId, String secondId) {
        this.firstId = firstId;
        this.secondId = secondId;
    }

    public String getFirstId() {
        return firstId;
    }

    public void setFirstId(String firstId) {
        this.firstId = firstId;
    }

    public String getSecondId() {
        return secondId;
    }

    public void setSecondId(String secondId) {
        this.secondId = secondId;
    }

    @Override
    public boolean equals(Object o) {
        if (o == this) return true;
        if (!(o instanceof DescriptorPair)) return false;
        DescriptorPair d = (DescriptorPair) o;
        return firstId.equals(d.getFirstId()) && secondId.equals(d.getSecondId());
    }

    @Override
    public int hashCode() {
        int result = 17;
        if (firstId != null){
            result = 31 * result + firstId.hashCode();
        }
        if (secondId != null){
            result = 31 * result + secondId.hashCode();
        }
        return result;
    }
}
